<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07-Date对象</title>
</head>
<body>
<script>
  var date = new Date();
  var fullYear = date.getFullYear();
  console.log(fullYear);
  var month = date.getMonth();
  console.log(month);
  var date1 = date.getDate();
  console.log(date1);
  var day = date.getDay();
  console.log(day);
  var hours = date.getHours();
  console.log(hours);
  var minutes = date.getMinutes();
  console.log(minutes);
  var seconds = date.getSeconds();
  console.log(seconds);
  var milliseconds = date.getMilliseconds();
  console.log(milliseconds);
  var time = date.getTime();
  console.log(time);
  console.log("------------");
  var fullYear1 = date.setFullYear(2025);
  console.log(fullYear1);
  var month1 = date.setMonth(11);
  console.log(month1);
  var date2 = date.setDate(31);
  console.log(date2);
  var hours1 = date.setHours(23);
  console.log(hours1);
  var minutes1 = date.setMinutes(59);
  console.log(minutes1);
  var seconds1 = date.setSeconds(0);
  console.log(seconds1);
  var milliseconds1 = date.setMilliseconds(999);
  console.log(milliseconds1);
  var time1 = date.setTime(99999999);
  console.log(time1);

</script>
</body>
</html>